package com.unitechs.appbiz;

import com.unitechs.framework.init.UniosApplication;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.client.RestTemplate;
import springfox.documentation.swagger2.annotations.EnableSwagger2;


//@EnableSwagger2
//@UniOSCloud
@SpringBootApplication
@EnableSwagger2
@EnableDiscoveryClient
@EnableScheduling
@ComponentScan(basePackages = "com.unitechs")
@EnableFeignClients("com.unitechs")
public class AppBizServiceBootstrap {
	@Autowired
	private RestTemplateBuilder builder;

	@Bean
	@LoadBalanced
	public RestTemplate restTemplate() {
		return builder.build();
	}

	public static void main(String[] args) {
		UniosApplication.run("AppBizServiceBootstrap", AppBizServiceBootstrap.class, args);
	}
}
